<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<body>
<div style="width: 30%;margin: auto">
    <h2>用户登录</h2>
    <span>{{ message }}</span>
    <form action="http://127.0.0.1:5000/index" method="post">
        用户名：<input type="text" name="username"><br>
        密　码：<input type="password" name="password"><br>
        <button type="submit" value="login">登录</button>
        <button type="button" value="register" onclick="goRegister()">注册</button>
    </form>
</div>
<script>
    function goRegister() {
        window.open('http://127.0.0.1:5000/register')
    }
</script>
</body>
</html>